STEP 6: Now the Codester is behind the UFO. We'll use an event to make something happen when they hit!

  • Go to . Drag Collision into your program.
  • Click Run to see what happens when the UFO hits the Codesters sprite.

The collision event causes the program to do something when our sprite touches another sprite.

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("space") sprite = codesters.Sprite("ufo") sprite.set_size(0.4) sprite.go_to(-200, -200) sprite.pen_down() sprite.glide_to(-100, -100)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)